package com.lxb.blog.dao;

import com.lxb.blog.entity.Tag;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;


import java.util.List;

public interface TagRepository  extends JpaRepository<Tag,Integer>{

    Tag findByName(String name);

    @Query("select t from Tag t")
    List<Tag> findTopBy(Pageable pageable);
}
